import 'package:flutter/material.dart';

class OrderDetail extends StatelessWidget {
  const OrderDetail({super.key});

  // const OrderDetail({super.key, required this.goodsId});
  // final String goodsId;
  
  

  @override
  Widget build(BuildContext context) {

    // 获取传递的数据
    ModalRoute modalRoute = ModalRoute.of(context)!;
    print(modalRoute.settings.arguments);

    return Scaffold(
        // 导航条
        appBar: AppBar(
          title: const Text('商品详情页',
              style: TextStyle(color: Colors.white, fontSize: 20)),
          backgroundColor: Colors.pink,
          centerTitle: true,
        ),
        // 主体区域
        body: Container(
            width: 150,
            height: 40,
            color: Colors.white,
            child: ElevatedButton(
                onPressed: () {
                  Navigator.pop(context);
                },
                child:  const Text('回到上一个页面'))));
  }
}
